phy/marvell: disable 4-port phys
authorIan Campbell <ijc@hellion.org.uk>
Wed, 20 Nov 2013 08:30:14 +0000 (08:30 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 17 Mar 2016 01:25:23 +0000 (01:25 +0000)
The Marvell PHY was originally disabled because it can cause networking
failures on some systems. According to Lennert Buytenhek this is because some
of the variants added did not share the same register layout. Since the known
cases are all 4-ports disable those variants (indicated by a 4 in the
penultimate position of the model name) until they can be audited for
correctness.

[bwh: Also #if-out the init functions for these PHYs to avoid
 compiler warnings]

Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name disable-some-marvell-phys.patch

drivers/net/phy/marvell.c

index 0240552b50f3228b16fb310afa52a0bdbe8fd4ef..1810a4a0e921cf4f866992f5299e48c8c35a659d 100644 (file)
@@ -664,6 +664,7 @@ static int m88e1118_config_init(struct phy_device *phydev)
        return phy_write(phydev, MII_BMCR, BMCR_RESET);
 }
 
+#if 0
 static int m88e1149_config_init(struct phy_device *phydev)
 {
        int err;
@@ -689,7 +690,9 @@ static int m88e1149_config_init(struct phy_device *phydev)
 
        return phy_write(phydev, MII_BMCR, BMCR_RESET);
 }
+#endif
 
+#if 0
 static int m88e1145_config_init(struct phy_device *phydev)
 {
        int err;
@@ -770,6 +773,7 @@ static int m88e1145_config_init(struct phy_device *phydev)
 
        return 0;
 }
+#endif
 
 /* marvell_read_status
  *
@@ -1078,6 +1082,7 @@ static struct phy_driver marvell_drivers[] = {
                .suspend = &genphy_suspend,
                .driver = { .owner = THIS_MODULE },
        },
+#if 0
        {
                .phy_id = MARVELL_PHY_ID_88E1145,
                .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -1093,6 +1098,8 @@ static struct phy_driver marvell_drivers[] = {
                .suspend = &genphy_suspend,
                .driver = { .owner = THIS_MODULE },
        },
+#endif
+#if 0
        {
                .phy_id = MARVELL_PHY_ID_88E1149R,
                .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -1108,6 +1115,8 @@ static struct phy_driver marvell_drivers[] = {
                .suspend = &genphy_suspend,
                .driver = { .owner = THIS_MODULE },
        },
+#endif
+#if 0
        {
                .phy_id = MARVELL_PHY_ID_88E1240,
                .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -1123,6 +1132,7 @@ static struct phy_driver marvell_drivers[] = {
                .suspend = &genphy_suspend,
                .driver = { .owner = THIS_MODULE },
        },
+#endif
        {
                .phy_id = MARVELL_PHY_ID_88E1116R,
                .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -1195,9 +1205,9 @@ static struct mdio_device_id __maybe_unused marvell_tbl[] = {
        { MARVELL_PHY_ID_88E1111, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E1118, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E1121R, MARVELL_PHY_ID_MASK },
-       { MARVELL_PHY_ID_88E1145, MARVELL_PHY_ID_MASK },
-       { MARVELL_PHY_ID_88E1149R, MARVELL_PHY_ID_MASK },
-       { MARVELL_PHY_ID_88E1240, MARVELL_PHY_ID_MASK },
+/*     { MARVELL_PHY_ID_88E1145, MARVELL_PHY_ID_MASK }, */
+/*     { MARVELL_PHY_ID_88E1149R, MARVELL_PHY_ID_MASK }, */
+/*     { MARVELL_PHY_ID_88E1240, MARVELL_PHY_ID_MASK }, */
        { MARVELL_PHY_ID_88E1318S, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E1116R, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E1510, MARVELL_PHY_ID_MASK },